home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS077A.dsk
/
SUPER CATALOG BUILDER.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
3KB
|
125 lines
5 HIMEM: 37886
10 HOME : PRINT "SUPER CATALOG BUILDER"
15 D$ = CHR$(4)
25 PRINT D$;"BLOAD SUPER CATALOG BUILDER.X"
30 DIM B$(200)
35 HTAB 1: VTAB 12
45 CALL -958
50 INPUT "FILE NAME = ";DN$
55 SECTAR = 12
60 :
61 REM ** READ DISKETTE **
62 REM ** DIRECTORY **
63 :
65 POKE 38159,SECTAR
70 :I = 37897
80 CALL 38144
100 :
101 REM ** READ MEMORY **
102 REM ** DUMP **
103 :
110 FOR M = 1 TO 7
120 FOR J = 0 TO 34
200 :
201 REM ** READ FIRST 3 **
202 REM ** BYTES **
203 :
210 IF J >2 THEN 300
215 K = PEEK(J +I)
220 :
221 REM ** FINISH IF FILE **
222 REM ** NOT LINKED **
223 :
225 IF K = 0 AND J = 0 THEN 515
230 :
231 REM * SKIP DELETED FILES *
232 :
235 IF K = 255 AND J = 0 THEN 237
236 GOTO 245
237 J = 35
240 IF J <2 THEN 400
242 ::::J = 35: GOTO 400
245 :
246 REM * READ FILE TYPE *
247 :
250 IF K = 0 OR K = 128 THEN TY$ = "INFO "
260 IF K = 1 OR K = 129 THEN TY$ = "BASIC "
270 IF K = 2 OR K = 130 THEN TY$ = "APPLESOFT "
280 IF K = 4 OR K = 132 THEN TY$ = "BINARY "
290 GOTO 400
300 :
301 REM ** READ FILE NAME **
302 :
305 IF J >30 THEN 400
310 KL = PEEK(J +I) -128
315 :
316 REM * ELIMINATE CONTROL *
317 REM * CHARACTERS *
318 :
320 IF KL <32 OR KL >94 THEN 400
325 A$ = A$ + CHR$(KL)
400 NEXT
405 :
406 REM * SKIP DELETED **
407 REM * FILES **
408 :
410 IF K = >255 THEN 435
415 :
416 REM ** LOAD MATRIX **
417 REM * WITH FILE NAME *
418 :
420 Y = Y +1
425 B$(Y) = A$ +TY$ +DN$
426 VTAB 23: INVERSE
427 PRINT Y: NORMAL
430 A$ = ""
435 I = I +35: NEXT
500 :
501 REM * PREPARE TO READ *
502 REM * NEXT SECTOR *
503 :
505 :SECTAR = SECTAR -1
510 IF SECTAR >1 THEN 65
515 VTAB 20: PRINT "FREE SPACE = "; FRE(X)
517 VTAB 22
520 PRINT "CONTINUE (Y/N) ? ";
525 GET QA$
530 IF QA$ = "Y" THEN 35
535 IF QA$ = "N" THEN 700
540 GOTO 517
575 GOTO 35
600 :
601 REM * WRITE CATALOG *
602 :
607 PRINT D$;"OPEN SUPER CAT"
610 PRINT D$;"WRITE SUPER CAT"
611 PRINT Y
615 FOR J = 1 TO Y
620 PRINT B$(J)
625 NEXT
630 PRINT D$;"CLOSE"
635 END
700 :
701 REM ** OPEN OR APPEND **
702 :
705 HTAB 1: VTAB 16
706 CALL -958
715 PRINT "OPEN OR APPEND O/A ";
716 GET DN$
717 PRINT
720 IF DN$ = "A" THEN 800
725 IF DN$ = "O" THEN 607
730 GOTO 705
800 PRINT D$;"APPEND SUPER CAT"
810 PRINT D$;"WRITE SUPER CAT"
820 FOR J = 1 TO Y
830 PRINT B$(J)
840 NEXT
850 PRINT D$;"OPEN SUPER CAT"
860 PRINT D$;"READ SUPER CAT"
870 INPUT YY
880 PRINT D$;"OPEN SUPER CAT"
890 PRINT D$;"WRITE SUPER CAT"
900 PRINT YY +Y
910 PRINT D$;"CLOSE"
920 END